package com.pangus.toolkits.files.download;

import lombok.Data;

/**
 * @author yingheng chen
 * @description 每个下载的分片结果
 * @date 2019/12/6
 */
@Data
public class PartResult {
    private int number; // part number, starting from 1.
    private long start; // start index in the part.
    private long end; // end index in the part.
    private boolean failed; // flag of part upload failure.
    private Exception exception; // Exception during part upload.
    private long length;

    public PartResult(int number, long start, long end) {
        this.number = number;
        this.start = start;
        this.end = end;
    }

    public PartResult(int number, long start, long end, long length) {
        this.number = number;
        this.start = start;
        this.end = end;
        this.length = length;
    }
}
